(module {{key}} (layer F.Cu) (tedit 5A2018AF)
  (descr "{{description}} {{lp.size_mm}} Metric, {{lp.size_in}} Imperial, square (rectangular) end terminal, IPC_7351 nominal, generated with https://github.com/trygvis/IPC-7351-footprints-generator")
  (tags {{tags}})
  (attr smd)
  (fp_text reference REF** (at 0 {{ lp.size_y / -4 }}) (layer F.Fab)
    (effects (font (size {{ rnd2(lp.size_y / 5) }} {{ lp.size_y / 5 }}) (thickness {{ lp.size_y / 5 * 0.15 }})))
  )
  (fp_text value VAL** (at 0 {{ lp.size_y / 4 }}) (layer F.Fab)
    (effects (font (size {{ rnd2(lp.size_y / 5) }} {{ lp.size_y / 5 }}) (thickness {{ lp.size_y / 5 * 0.15 }})))
  )

  (fp_text user %R (at 0 {{ lp.size_y / -4 }}) (layer "F.SilkS")
    (effects (font (size 0.7 0.7) (thickness 0.1)))
  )
  (fp_text user %V (at 0 {{ lp.size_y / 4 }}) (layer "F.SilkS")
    (effects (font (size 0.7 0.7) (thickness 0.1)))
  )

  {# Outline #}
  (fp_line (start {{ lp.size_x / -2 }} {{ lp.size_y / -2 }}) (end {{ lp.size_x /  2 }} {{ lp.size_y / -2 }}) (layer F.Fab) (width 0.05))
  (fp_line (start {{ lp.size_x /  2 }} {{ lp.size_y / -2 }}) (end {{ lp.size_x /  2 }} {{ lp.size_y /  2 }}) (layer F.Fab) (width 0.05))
  (fp_line (start {{ lp.size_x /  2 }} {{ lp.size_y /  2 }}) (end {{ lp.size_x / -2 }} {{ lp.size_y /  2 }}) (layer F.Fab) (width 0.05))
  (fp_line (start {{ lp.size_x / -2 }} {{ lp.size_y /  2 }}) (end {{ lp.size_x / -2 }} {{ lp.size_y / -2 }}) (layer F.Fab) (width 0.05))

  {# Courtyard #}
  (fp_line (start {{ -lp.courtyard_x }} {{ -lp.courtyard_y }}) (end {{  lp.courtyard_x }} {{ -lp.courtyard_y }}) (layer F.CrtYd) (width 0.05))
  (fp_line (start {{  lp.courtyard_x }} {{ -lp.courtyard_y }}) (end {{  lp.courtyard_x }} {{  lp.courtyard_y }}) (layer F.CrtYd) (width 0.05))
  (fp_line (start {{  lp.courtyard_x }} {{  lp.courtyard_y }}) (end {{ -lp.courtyard_x }} {{  lp.courtyard_y }}) (layer F.CrtYd) (width 0.05))
  (fp_line (start {{ -lp.courtyard_x }} {{  lp.courtyard_y }}) (end {{ -lp.courtyard_x }} {{ -lp.courtyard_y }}) (layer F.CrtYd) (width 0.05))

  (pad 1 smd rect (at {{ -lp.pad_pos_x }} 0) (size {{ lp.pad_size_x }} {{ lp.pad_size_y }}) (layers F.Cu F.Paste F.Mask))
  (pad 2 smd rect (at {{  lp.pad_pos_x }} 0) (size {{ lp.pad_size_x }} {{ lp.pad_size_y }}) (layers F.Cu F.Paste F.Mask))

  (model {{ model3d }}
    (at (xyz 0 0 0))
    (scale (xyz 1 1 1))
    (rotate (xyz 0 0 0))
  )
)
